﻿using System.Linq;
using Buddy.Swtor;

namespace WingIt.Routines
{
    //This is for every class
    [RevisionControlId("$Id: Global.cs 684 2012-08-08 10:09:07Z Chinajade $")]
    public class Global
    {
        public static bool IsElite { get { return BuddyTor.Me.CurrentTarget != null && BuddyTor.Me.CurrentTarget.Toughness >= CombatToughness.Strong; } }
        public static bool RequiresCrowdControl { get { return BuddyTor.Me.CurrentTarget != null && (BuddyTor.Me.CurrentTarget.IsCasting || !(BuddyTor.Me.CurrentTarget.Toughness == CombatToughness.Standard || BuddyTor.Me.CurrentTarget.Toughness == CombatToughness.Weak)); } }
        public static bool CCBreak { get { return BuddyTor.Me.IsStunned; } }

        #region Combat Interaction Ranges
        public class Distance
        {
            /// <summary>
            /// Maximum range for interaction with targets for melee.
            /// This value should also be used for cleave-style AoE attacks.
            /// </summary>
            public const float Melee = 0.35f;
            /// <summary>
            /// Some melee AoE spells are effective at greater than melee distance, but less than range distance.
            /// Examples include:<list type="bullet">
            /// <item><description><para> * Jedi Knight's "Awe" / Sith Juggernaut's "Intimidating Roar"</para></description></item>
            /// <item><description><para> * Jedi Consular's "Force Wave" / Sith Inquisitor's "Overload"</para></description></item>
            /// </list>
            /// This is NOT a 'cleave range', use <c>Distance.Melee</c> for that.
            /// </summary>
            public const float MeleeAoE = 0.8f;
            /// <summary>
            /// Maximum range for interaction with targets at a distance.
            /// </summary>
            public const float Ranged = 2.8f;
        }
        #endregion  // Combat Interaction Ranges

        public const int EnergyMinimum = 65;
        public const int CellMinimum = 8;
        
        #region Health constants
        public class Health
        {
            public const float Full = 100;
            public const float Strong = 95;
            public const float Shield = 90;
            public const float High = 75;
            public const float Mid = 50;
            public const float Critical = 40;
            public const float OffHealThreshold = 40;
            public const float Low = 30;
            public const float OhShit = 15;
            public const float NotDeadYet = 3;
        }
        #endregion

        #region Player & Companion party roles
        // Players or companions must assume one of these Roles
        public enum PartyRole
        {
            MeleeTank,
            RangedTank,
            MeleeDPS,
            RangedDPS,
            Healer
        }
        #endregion

        #region Debug
        // Turn on only for debugging purposes...
        public class Debug
        {
            public const bool MeasureBehaviorTreePulseRate = false;
        }
        #endregion


    }
}
